const expres = require('express')

const router = expres.Router()


// 引入路由的处理函数
const user = require('../router_handler/user')

// 引入验证参数中间件
const expressJoi = require('@escook/express-joi')
// 引入验证规则
const {userSchema} = require('../schema/user')

router.post('/reguser', expressJoi(userSchema), user.reguser)

router.post('/login', expressJoi(userSchema), user.login)

module.exports = router
